#ifndef CURVEITEM_H
#define CURVEITEM_H

#include <QPainter>
#include <QGraphicsItem>

/**
 * @brief The CurveItem class
 * 自定义曲线
 */
class CurveItem : public QGraphicsLineItem
{
public:
    explicit CurveItem(QGraphicsItem *parent = Q_NULLPTR);
    CurveItem(qreal x1, qreal y1 , qreal x2, qreal y2, QGraphicsItem *parent = Q_NULLPTR);
    CurveItem(const QLineF &line, QGraphicsItem *parent = Q_NULLPTR);

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;

private:
    QPainterPath path;
};

#endif // CURVEITEM_H
